Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: only output error message if LLM returns no actionable command #53

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

corneliusroemer
Copy link
Contributor

The script now checks immediately if the returned command matches the designated failure message before proceeding with further actions like explanation or option printing.

This modification ensures that if the input prompt is unclear, the script directly outputs a clear error message and exits without executing additional unnecessary steps, aligning better with user expectations and reducing confusion.

This change improves user experience by providing immediate feedback on input validity and makes the script's flow more logical and efficient.

Resolves #52

Signed-off-by: Cornelius Roemer [email protected]

The script now checks immediately if the returned command matches the designated failure message before proceeding with further actions like explanation or option printing.

This modification ensures that if the input prompt is unclear, the script directly outputs a clear error message and exits without executing additional unnecessary steps, aligning better with user expectations and reducing confusion.

This change improves user experience by providing immediate feedback on input validity and makes the script's flow more logical and efficient.

Resolves TNG#52

Signed-off-by: Cornelius Roemer <[email protected]>
@@ -469,16 +469,16 @@ function main() {
check_key

get_command

if test "${command}" = "${fail_msg}"; then
exit 1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On my system this seems to result in no error message being shown at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Confusing output: command: echo 'I do not know. Please rephrase your question.'
2 participants